<?php
require_once 'database.php';
//require_once '../DTO/KHACHHANG_DTO.php';

    class xl_loai_hinh_kinh_doanh extends database
    {
        function danh_sach()
        {
            $sql = "select * from loai_hinh_kinh_doanh";
            $this->setQuery($sql);
            return $this->loadAllRow();
        }
        function so_luong()
        {
            $sql = "select count(*) from khach_hang";
            $this->setQuery($sql);
            return $this->loadResult();
        }
        function xem($ma)
        {
            //$ma = intval($ma);

            $sql = "select * from loai_hinh_kinh_doanh where ma = '$ma'";
            $this->setQuery($sql);
            return $this->loadRow();
        }
        function kt_email($email)
        {
            $sql = "select * from khach_hang where email = '$email'";
            $this->setQuery($sql);
            return $this->loadRow();
        }
        function xoa($ma)
        {
            $ma = intval($ma);

            $sql = "delete from khach_hang where ma = '$ma'";
            $this->setQuery($sql);
            return $this->query();
        }

    }
?>